<?php
namespace Admin\Controller;
use Think\Controller;
class CommonController extends Controller {
	public function check(){
		if(isset($_SESSION['UID'])&&$_SESSION['UID']!='' ||
				isset($_SESSION['ACCOUNT'])&&$_SESSION['ACCOUNT']!='')
		{
			$this->assign('username',$_SESSION['ACCOUNT']);
		}
		else{
			$this->redirect('/Admin/login/login');
		}
	}
	
    public function index(){
		
        $this->display();
    }
    
    public function response( $status , $count , $data , $exit = false){
		
		$data = array(
			'status' => $status,
			'count'  => $count,
			'data'	 => $data
		);
		
		$this->ajaxReturn($data);
		
		if( $exit == false){
			exit();
		}
		
		return;
	}
}
